﻿<%@ Page Language="C#" AutoEventWireup="true"  MasterPageFile="~/MasterPage.master" CodeFile="~/Admin/VerCajas.aspx.cs" Inherits="Admin_VerCajas" %>
<%@ Register Src="../UserControls/Fecha.ascx" TagName="Fecha" TagPrefix="uc1" %>
<asp:Content ID="Content1"  ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div style="text-align: center; vertical-align: text-top;">
        <h1 style="text-align: left">
            &nbsp;&nbsp;&nbsp; Ver Cajas<asp:ScriptManager id="ScriptManager1" runat="server"></asp:ScriptManager></h1>

<table class="tablaForm" style=" width: 550px; text-align:left">
    <tr>
        <td class="tdCajas" align="right" colspan="4">Ver Cajas</td>
        </tr>
    <tr>
        <td class="tdLiteral" align="right" style="width: 20%">
            Fecha Desde:
            </td>
        <td style="width: 30%" class="tdForm" align="left">
            <uc1:Fecha ID="FechaD" runat="server" />
            
            </td>
         <td class="tdLiteral" align="right" style="width: 20%">
            Fecha Hasta:
            </td>
        <td style="width: 30%" class="tdForm" align="left">
            <uc1:Fecha ID="FechaH" runat="server" />
        </td>
    </tr>
     <tr>
        <td align="right" class="tdLiteral" style="width: 20%; height: 26px;">
            Por N&uacute;mero:</td>
        <td align="left" class="tdForm" style="width: 30%; height: 26px;">
            <asp:TextBox ID="txtIdCaja" runat="server" Width="100px"></asp:TextBox>
            <asp:RangeValidator ID="rvIdCajas" runat="server" ControlToValidate="txtIdCaja" ErrorMessage="(*)" MaximumValue="99999999" MinimumValue="1"></asp:RangeValidator></td>
        <td align="right" class="tdLiteral" style="width: 20%; height: 26px;">
            Por Estado:</td>
        <td align="left" class="tdForm" style="width: 30%; height: 26px;">
            &nbsp;<asp:DropDownList ID="cboEstado" runat="server" Width="100px">
                <asp:ListItem Value="0" Selected="True">Todas</asp:ListItem>
                <asp:ListItem Value="1">Cerradas</asp:ListItem>
                <asp:ListItem Value="2">Abiertas</asp:ListItem>
            </asp:DropDownList></td>
    </tr>
    <tr>
        <td class="tdBotones" colspan="4">
            <asp:Button id="btnBuscar" onclick="btnBuscar_Click" runat="server" Text="Buscar" Width="75px"></asp:Button>&nbsp;
            <asp:Button id="btnCancelar" onclick="btnCancelar_Click" runat="server" Text="Cancelar" Width="75px"></asp:Button>
            </td>
    </tr>
    <tr>
        <td style="WIDTH: 550px" colspan="4">
            <asp:GridView id="gvCajas" runat="server" BorderWidth="1px" BackColor="White" Width="100%" OnPageIndexChanging="gvCajas_PageIndexChanging" 
                OnSelectedIndexChanged="gvCajas_SelectedIndexChanged" CellPadding="3" AllowPaging="True" AutoGenerateColumns="False" 
                DataKeyNames="Id_Caja" BorderColor="#999999" BorderStyle="None" GridLines="Vertical">
                <FooterStyle BackColor="#CCCCCC" ForeColor="Black"></FooterStyle>
                <columns>
                     <asp:TemplateField HeaderText="Caja">
                        <HeaderStyle ForeColor="White" HorizontalAlign="Center"></HeaderStyle>
                        <ItemTemplate>
                            <asp:Label id="Id_Caja" runat="server" Text='<%# Bind("Id_Caja") %>'></asp:Label> 
                        </ItemTemplate>
                        </asp:TemplateField>
                     <asp:TemplateField HeaderText="Fecha">
                        <HeaderStyle ForeColor="White" HorizontalAlign="Center"></HeaderStyle>
                        <ItemTemplate>
                            <asp:Label id="Fecha" runat="server" Text='<%# Bind("Fecha", "{0:dd/MM/yyyy}") %>'></asp:Label> 
                        </ItemTemplate>
                        </asp:TemplateField>
                    <asp:TemplateField HeaderText="Total">
                        <HeaderStyle ForeColor="White" HorizontalAlign="Center"></HeaderStyle>
                        <ItemTemplate>
                            <asp:Label id="Total" runat="server" Text='<%# Bind("Total", "{0:F2}") %>'></asp:Label> 
                        </ItemTemplate>
                        </asp:TemplateField>
                    <asp:TemplateField HeaderText="Estado">
                        <HeaderStyle ForeColor="White" HorizontalAlign="Center"></HeaderStyle>
                        <ItemTemplate>
                            <asp:Label id="Estado" runat="server" Text='<%# Bind("sEstado") %>'></asp:Label> 
                        </ItemTemplate>
                        </asp:TemplateField>
                    <asp:TemplateField HeaderText="Usuario">
                        <HeaderStyle ForeColor="White" HorizontalAlign="Center"></HeaderStyle>
                        <ItemTemplate>
                            <asp:Label id="UsuarioLog" runat="server" Text='<%# Bind("UsuarioLog") %>'></asp:Label> 
                        </ItemTemplate>
                        </asp:TemplateField>
                    <asp:TemplateField HeaderText="Pase Caja">
                        <HeaderStyle ForeColor="White" HorizontalAlign="Center"></HeaderStyle>
                        <ItemTemplate>
                            <asp:Label id="PaseCaja" runat="server" Text='<%# Bind("PaseCaja") %>'></asp:Label> 
                        </ItemTemplate>
                        </asp:TemplateField>
                    <asp:TemplateField ShowHeader="False">
                        <HeaderStyle ForeColor="White"></HeaderStyle>
                        <ItemTemplate>
                            <asp:LinkButton runat="server" Text="Seleccionar" CommandName="Select" CausesValidation="False" id="LinkButton2"></asp:LinkButton>
                        </ItemTemplate>
                        </asp:TemplateField>
                </columns>
                <RowStyle BackColor="#EEEEEE" ForeColor="Black" HorizontalAlign="Center"></RowStyle>
                <EditRowStyle Wrap="True"></EditRowStyle>
                <SelectedRowStyle BackColor="#008A8C" ForeColor="White" Font-Bold="True"></SelectedRowStyle>
                <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center"></PagerStyle>
                <HeaderStyle BackColor="#325FB9" ForeColor="White" Font-Names="Arial Rounded MT Bold" Font-Bold="True"></HeaderStyle>
                <AlternatingRowStyle BackColor="Gainsboro"></AlternatingRowStyle>
            </asp:GridView>
            </td>
        </tr>
        <tr>
            <td colspan="2" class="tdTit" style="width: 50%; text-align: right;">
                Total $:</td>
            <td colspan="2" class="tdLiteral" style="width: 50%; text-align: left;">
                &nbsp;<asp:TextBox ID="txtTotal" runat="server" Font-Bold="True" ReadOnly="True"
                    Width="120px"></asp:TextBox></td>
        </tr>
        </table><br /><br />
    </div>
</asp:Content>
